<?
class Sys extends Root{
	var $type;
	var $Modules;
	var $Conf;
	var $Header;
	var $Skin;
	var $DefaultSkin;
	var $Lien;
	var $PageDefaut;
	var $Connection;
	var $User;
	var $Driver;
	//Entete
	var $Description;
	var $Titre;
	var $MotsCles;
	var $Url;
	var $ReplyTo;
	var $Classification;
	var $Process;
	//Variables
	var $GetVars;
	var $PostVars;
	var $RegVars;
	var $FilesVars;
// 	var $BlockList;
	var $menuId;
	var $Db;
	var $Error;
	var $Language;
	var $DefaultLanguage;
	var $isLogged = 0;


//***********************************
//	CONSTRUCTEUR
//***********************************
	function Sys() {
		//Generation de la configuration
 		$this->initConf();
		//Initialisation du systeme de log
		$this->Log = new Klog("Log/Systeme.log");
		$this->Log->log("---------------------------------------- DEPART----------------------------------------");
		$this->Log->log("GET -> ".$_SERVER["REQUEST_URI"]);
		$this->Error = new Error();
		$this->DefaultSkin = SHARED_SKIN;
		//Recuperation du tableau des variables POST
		$this->PostVarsToPhp();
		$this->GetVarsToPhp();
		$this->FilesVarsToPhp();
 		$LienOrig = explode("?",$_SERVER["REQUEST_URI"]);
 		$LienOrig = explode("#",$LienOrig[0]);
		$this->registerVar("Anchor",$LienOrig[1]);
		$this->registerVar("LienOrig",$LienOrig[0]);
		$LienSplit = explode("/",$LienOrig[0]);
		$this->registerVar("LienSplit",$LienSplit);
                $this->registerVar("Url","http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]);
		$this->registerVar("Domaine","http://".$_SERVER["HTTP_HOST"]);
		$this->registerVar("Month",date("m"));
	}

//***********************************
//	Fonction de Controle Externe
//***********************************

	function Connect() {
		//Intialisation des modules
  		$this->initModules();
		//Intialisation des langages
  		$this->initLanguages();
		//Crï¿œtion de la connexion
		$GLOBALS["Chrono"]->start("Connexion");
  		$this->Connection =new Connection();
		$GLOBALS["Chrono"]->stop("Connexion");
  		$this->registerVar("DefaultUser",MAIN_USER_NUM);
  		if (!empty($GLOBALS["Systeme"]->User->Skin)) $GLOBALS['Systeme']->Skin=$GLOBALS["Systeme"]->User->Skin;
// 		COnfiguration du Lien
 		$this->configLien();
	}

	function configLien() {
		//Detection des URLS
		$Lien = $_SERVER["REQUEST_URI"];
		$Lien = explode("?",$Lien);
		$Lien = explode("/",$Lien[0],2);
		$Lien = $Lien[1];
		$this->setDefault($this->Conf->get("GENERAL::SERVER::DEFAULT_LINK"));
		//Test si l url definit un fichier ou un dossier
		if (preg_match("#([A-z\/\-0-9\@\*]+)\.([A-z0-9]+)$#",$Lien,$out)) {
			//C un fichier qui est defini
			$this->type=strtolower($out[2]);
		}elseif(preg_match("#([A-z\/\-0-9\@\*\.]+)\.([A-z]+)\.([A-z]+)\.([0-9]+)x([0-9]+)$#",$Lien,$out)){

			$this->type=strtolower($out[2]);
			//echo $this->type;
		}else{
			//C un dossier
			$this->type="html";
		}
		//-------------------------------------------------------------------//
		//	SI LIEN VIDE !!!!!!!					     //
		//   ICI GESTION DES CAS PAR DEFAUT !!!!!!!			     //
		//   SI USER A MENU ALORS MENU PAR DEFAUT			     //
		//   SINON URL SKIN PAR DEFAUT					     //
		//		DONC INIT SKIN ICI + LECTURE CONF		     //
		//   SINON PAGE KOB-EYE DEFAUT DANS LA CONF			     //
		//-------------------------------------------------------------------//
		if ($Lien=="") {
			$DefaultMenu = $this->getDefaultUserMenu();
			if ($DefaultMenu!=NULL) {
				//Alors on afiche le menu par defaut de l utilisateur
				$this->setLink($DefaultMenu);
			}else{
				//Alors il faut definir le lien par defaut dela skin

			}
		}else{
			$this->setLink($Lien);
		}
	}

	function AnalyseVars(){
		//Ici on definit les variables globales necessaires.
		//On extrait le type
		$Lien = $this->Lien;
		$Lien = explode("?",$Lien);
		$Lien = explode(".".$this->type,$Lien[0]);
		$Lien = $Lien[0];

		//Recuperation des Donnï¿œes du Module
		$Out = split("/",$Lien);
		$Module = $Out[0];
		//OK
		if ($this->isModule($Module)) {
			//Alors c un Module
			//Formatage du lien
			$this->CurrentModule =$Module;
			$Result = $Module;
			for ($i=1;$i<sizeof($Out);$i++) {
				$Result.="/";
				$Result.=$Out[$i];
				if ($i>1) $Short .= "/";
				$Short.=$Out[$i];
			}
			$this->Query = $Result;
			$this->ShortQuery = $Short;
		}else{
			//Alors c est un menu
			$this->Query=$this->AnalyseMenu($Lien);
			//Recuperation des Donnï¿œes du Module
			$Out = split("/",$this->Query);
			$this->CurrentModule = ($Out[0]!="")?$Out[0]:"Systeme";
		}
		//Analyse de l Url
		$Tab = $this->Modules[$this->CurrentModule]->splitQuery($this->ShortQuery);
		$GLOBALS["Systeme"]->Log->log("PAGE => ".$this->Query);
		$GLOBALS["Systeme"]->Log->log("QUERY => ".$Tab[0]["Query"]);
		$backQuery = $this->CurrentModule;
		for ($i=0;$i<sizeof($Tab)-1;$i++) {
			$backQuery .= "/".$Tab[$i]["DataSource"].(($Tab[$i]["Value"]!="")?"/":"").$Tab[$i]["Value"];
		}
		$this->registerVar("backQuery",$backQuery);
		$this->registerVar("Query",$Tab[0]["Query"]);
		$lastObject = $Tab[sizeof($Tab)-1]["DataSource"];
		$this->registerVar("lastObject",$lastObject);
		$this->registerVar("firstObject",$Tab[0]["DataSource"]);
		//Construction de la Requete de liste des objets dans le cas d une recurisivitï¿œ
		$i=0;$test=false;
		$ListObject = $this->CurrentModule;
		foreach ($Tab as $T) {
			if ($T["DataSource"]==$lastObject) $test=true;
			if (!$test) $ListObject .= "/".$T["DataSource"]."/".$T["Value"];
		}
		$ListObject .= "/".$lastObject;
		$this->registerVar("QueryListObject",$ListObject);
		$this->registerVar("listObject",$ListObject);
		$this->registerVar("QueryLastObject",$lastObject);
		$this->registerVar("QueryFirstObject",$Tab[0]["DataSource"]);
		$this->registerVar("QueryLastValue",$Tab[count($Tab)-1]["Value"]);
		$this->registerVar("QueryModule",$this->CurrentModule);
		$lastObject = $Tab[sizeof($Tab)-1]["DataSource"];
	}

	//Recuoperation du menu pour l utilisateur connectï¿œ
	function Menus () {
		return $this->User->Menus;
	}

	function searchMenu($Men,$Tab=0,$Niv=0) {
		//Sinon on continue a analyser le lien
		if ($Tab==0)$Tab=$this->User->Menus;
		$Menus = split("/",$Men);
		$Result=false;
		$T = $Menus[$Niv];
		for ($i=0;$i<sizeof($Tab);$i++){
			$Tab[$i]->Niveau = $Niv;
			$Url = $Tab[$i]->Url;
			if ($Url==$T&&$Niv<sizeof($Menus)-1) {
				$Result = $this->searchMenu($Men,$Tab[$i]->Menus,$Niv+1);
				if (!$Result) {
					//Peut etre Alias ?
					$Tab[$i]->Niveau = $Niv;
					return $Tab[$i];
				}else{
					return $Result;
				}
			}elseif ($Url==$T){
				return $Tab[$i];
			}
		}
		return $Result;
	}

	function AnalyseMenu($Lien,$nb=0){
		//Recuperation des Donnï¿œes du Module
		$Out = split("/",$Lien);
		$Module = $Out[0];
		//Si c est une requete alors on sort avec la reponse
		if ($this->isModule($Module)) {
			$this->CurrentModule =$Module;
			return $Lien;
		}
		//Sinon on continue a analyser le lien
		$Menus = split("/",$Lien);
		$Results = $this->searchMenu($Lien);
		if (is_object($Results))$this->CurrentMenu = $Results;
		if ($Results->Alias!=""&&$Results->Niveau<sizeof($Menus)){
			$LienResult = $Results->Alias;
			for($j=$Results->Niveau+1;$j<sizeof($Menus);$j++) {
				if ($Menus[$j]!="")$LienResult.="/".$Menus[$j];
			}
// 			echo "LIENRESULT--> ".$LienResult." NIVEAU ".$Results->Niveau;
			return $this->AnalyseMenu($LienResult,"",$Lien);
		}

		//---------------------------------------------------------//
		// MESSAGE ERREUR PAGE INTROUVABLE + RAPPORT ERREUR	   //
		//---------------------------------------------------------//
		if (!is_object($Results)&&!$nb) {
			//On renvoie le menu par defaut
			return $this->AnalyseMenu($this->PageDefaut,1);
		}elseif($nb) die("IMPOSSIBLE DE TROUVER LE MENU PAR DEFAUT ".$this->PageDefaut." LANG ".$this->DefaultLanguage." SKIN ".$this->Skin);
		if (($Results->Lien!="")&&($Lien!=$Results->Lien)){

			return $this->AnalyseMenu($Results->Lien,"",$Lien);
		}
	}

	function getDefaultUserMenu(){
/*		print_r($this->User);*/
	}

	function Affich() {
		$Data= $this->getContent();
		//$Data.="\n </Br>User --> ".$this->Connection->User;
		return $Data;
	}

//***********************************
//	Fonction D Initialisation
//***********************************
	function initConf(){
		$this->Conf = new Conf("Conf/General.conf");
	}

	function connectSQL() {
		//Connexion PEAR
		if (is_object($this->Db[0])) return;
		require_once "Class/Lib/MDB2.php";
		$this->Db[0] = & MDB2::connect($this->Conf->get("GENERAL::BDD::BDD_DSN"));
		if (get_class($this->Db[0])!='MDB2_Error'){
			$this->Db[0]->options["portability"]=0;
			$this->Db[0]->setFetchMode(MDB2_FETCHMODE_ASSOC);
			$this->Db[0]->exec("SET NAMES 'utf8';");
		}else{
			die('<div class="Error">Impossible de se connecter à la base mysql.</div>');
		}
		//mysql_connect($host, $user,$password) or die("erreur de connexion au serveur");
		//mysql_select_db($bdd) or die("erreur de connexion a la base de donnees");
	}

	function initModules() {
		//Definition des Modules
		$Temp = $this->Conf->get("MODULE");
		foreach ($Temp as $Mod) {
			//Configuration du Module
			$this->Modules[$Mod["NAME"]] = new Module($Mod);
		}
	}

	function initLanguages() {
		$Temp = $this->Conf->get("GENERAL::LANGUAGE");
		foreach ($Temp as $Tit=>$Lang) {
			if ($Lang["DEFAULT"]){
				 $this->DefaultLanguage = $Lang["TITLE"];
				$this->LangageDefaut = $Lang["TITLE"];
			}
			//Configuration des langues
			$this->Language[$Lang["TITLE"]] = $Tit;
		}
	}
//***********************************
//	Manipulation des Variables
//***********************************
	function registerVar($Name,$Value){
		$this->RegVars[$Name] = $Value;
	}

	function PostVarsToPhp() {
		$this->PostVars = $_POST;
		//Resoplution des problemes d encodages dues a l AJAX
		if (is_array($this->PostVars))foreach ($this->PostVars as $K=>$P) {
			if (!is_array($P)&&!is_object($P))$this->PostVars[$K] = $P;
			else $this->PostVars[$K] = $P;
		}
		//Detection des variables JSON (AJAX)
		if (isset($_POST["data"])){
			$this->Log->log("JSON DECODE : ".$_POST["data"]."\r\n",json_decode($_POST["data"]));
			$this->RegVars["JSON"] = json_decode($_POST["data"]);
		}
	}
	
	function GetVarsToPhp() {
		$this->GetVars = $_GET;
	}

	function GetVarsLink() {
		foreach ($_GET as $k=>$g) {if ($r!="")$r.="&";$r.=$k."=".$g;}
		return $r;
	}
	function FilesVarsToPhp() {
		$this->FilesVars = $_FILES;
	}

	function getPostVars($Data) {
		return $this->PostVars[$Data];
	}
	function getGetVars($Data) {
		return $this->GetVars[$Data];
	}

	function getRegVars($Data) {
		return $this->RegVars[$Data];
	}
	function getFilesVars($Data) {
		return $this->FilesVars[$Data];
	}


//***********************************
//	Methodes GETTER
//***********************************
	//	Methodes PRIVES

	function isModule($Temp) {
		$ModTemp = array_keys($this->Modules);
		for ($i=0;$i<count($this->Modules);$i++) {
			if ($ModTemp[$i]==$Temp) {
				return true;
			}
		}
		return false;
	}

	function getBlockList(){
		//On passe dans le tableau pour retirer les eventuels doublons
		$NewTab=Array();
		for ($i=0;$i<count($this->BlockList);$i++){
			for ($j=0;$j<count($NewTab);$j++){
				if($this->BlockList[$i]==$NewTab[$j]){
					$flag=true;
				}
			}
			if (!$flag) $NewTab[]=$this->BlockList[$i];
		}
		return $NewTab;
	}

	function getContenu($Process) {
		//Recuperation des Donnï¿œes du Module
		$Out = split("/",$this->Query);
		for ($i=1;$i<sizeof($Out);$i++) {
			if ($i>1)$Result.="/";
			$Result.=$Out[$i];
		}
		$this->registerVar("Query",$this->RegVars["Query"]);
		$Data = $this->Modules[$this->CurrentModule]->Affich($Result,$Process);
		return $Data;
	}

	function output_file($file,$name,$attach=true,$detectmime=true){
		//do something on download abort/finish
		//register_shutdown_function( 'function_name'  );
		if(!file_exists($file))
		die('file '.$file.' not exist!');
		$size = filesize($file);
		$name = rawurldecode($name);

		if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']))
		$UserBrowser = "Opera";
		elseif (ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']))
		$UserBrowser = "IE";
		else
		$UserBrowser = '';

		/// important for download im most browser
/*		$mime_type = ($UserBrowser == 'IE' || $UserBrowser == 'Opera') ?
		'application/octetstream' : 'application/octet-stream';*/
		@ob_end_clean(); /// decrease cpu usage extreme
		if ($detectmime)header('Content-Type: ' . mime_content_type($file));
		header('Content-Length: ' . filesize($file));
		header("Last-Modified: " . gmdate('D, d M Y H:i:s', time()-3600) . ' GMT');
		if ($attach){
			header('Content-disposition: attachment; filename='. $name);
			header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
			header('Expires: 0');
			header("Cache-control: private");
			header('Pragma: no-cache');
			header('Accept-Ranges: bytes');
		}
		/////  multipart-download and resume-download
		if(isset($_SERVER['HTTP_RANGE'])){
			list($a, $range) = explode("=",$_SERVER['HTTP_RANGE']);
			str_replace($range, "-", $range);
			$size2 = $size-1;
			$new_length = $size-$range;
			header("HTTP/1.1 206 Partial Content");
			header("Content-Length: $new_length");
			header("Content-Range: bytes $range$size2/$size");
		}else{
			$size2=$size-1;
			header("Content-Length: ".$size);
		}
		$chunksize = 1*(1024*1024);
		$this->bytes_send = 0;
		if ($file = fopen($file, 'r')){
			if(isset($_SERVER['HTTP_RANGE']))fseek($file, $range);
			while(!feof($file) and (connection_status()==0)){
				$buffer = fread($file, $chunksize);
				print($buffer);//echo($buffer); // is also possible
				flush();
				$this->bytes_send += strlen($buffer);
				//sleep(1);//// decrease download speed
			}
			fclose($file);
		}else	die('error can not open file');
		if(isset($new_length))$size = $new_length;
	}

	function saveGroupData($id){
		$ModulesInv = array_keys($this->Modules);
		$Modules["Systeme"] = "Rien";
 		for ($i=0;$i<count($this->Modules);$i++){
		//	echo "OK";
			if (method_exists($this->Modules[$ModulesInv[$i]],"loadSchema")){
				$this->Modules[$ModulesInv[$i]]->loadSchema();
				if (method_exists($this->Modules[$ModulesInv[$i]]->Db,"saveGroupData")){
					$Resultats .= $this->Modules[$ModulesInv[$i]]->Db->saveGroupData($id);
				}
			}
		}
		return htmlentities($Resultats);
	}

	function getContent() {
		$detectmime = true;
		switch($this->type){
			case "mp3":
			case "mpeg":
			case "mpg":
			case "flv":
			case "css":header("Content-type: text/css");$detectmime=false;
			case "jpg":
			case "swf":
			case "ico":
			case "js":
			case "png":
			case "gif":
				$this->Lien=substr($this->RegVars["LienOrig"],1);
				$file = $this->Lien;
				$Temp = explode("/",$file);
				$name = $Temp[sizeof($Temp)-1];
				$this->output_file($file,$name,false,$detectmime);
			break;
			case "pdf":
			case "ppt":
			case "ppz":
			case "pps":
			case "pot":
			case "xmn":
			case "lnn":
			case "exe":
			case "doc":
				$this->Lien=substr($this->RegVars["LienOrig"],1);
				$file = $this->Lien;
				$Temp = explode("/",$file);
				$name = $Temp[sizeof($Temp)-1];
				$this->output_file($file,$name);
			break;
			case "xml":
				header("Content-type: text/xml; charset=".CHARSET_CODE."");
				$this->AnalyseVars();
				$Process=new Process();
				if ($this->Lien==NULL) $this->setLink($this->PageDefaut);
				$Skin = new Skin();
				$data = $Skin->ProcessLang($this->getContenu($Process));
				@ob_end_clean(); /// decrease cpu usage extreme
				print($data);
			break;
			case "soap":
				//header("Content-type: text/xml; charset=".CHARSET_CODE."");
				//Constrcution du serveur soap
				// On tente d'instancier la classe soapServer
				// Si cela s'av�re impossible, on l�ve une exception
				$this->AnalyseVars();
				try {
					$server = new SoapServer(null,  array('trace' => 1, 'uri' => $this->Lien,'encoding'=>'ISO-8859-1'));
					// On d�finit la classe qui va g�rer les requ�tes SOAP
					$server -> setclass('WebService');
				} catch (Exception $e) {
					echo $e;
				}
				// La m�thode POST a �t� utilis�e pour appeller cette page.
				// On suppose donc qu'une requ�te a �t� envoy�e, on la g�re
				if ($_SERVER['REQUEST_METHOD'] == 'POST') {
					$server -> handle();
				}
			break;
			case "htm":
				$this->Log->log("START DL -> ".$this->Lien);
				//$this->Header = new Header();
				header("Content-type: text/html; charset=".CHARSET_CODE."");
				$data = $this->Lien;
				if (@fopen($data,'r') ) {
					$data=implode ('', file ($data));
				}else{
					//ON definie les variables d environnements
					$this->AnalyseVars();
					$this->Log->log("ANALYSE VARS -> OK");
					if ($this->Lien==NULL) $this->setLink($this->PageDefaut);
					$Process=new Process();
					$this->Log->log("INIT PROCESS -> OK");
					$data = $this->Error->displayErrors();
					$this->Log->log("DISPLAY ERROR -> OK");
					$Skin = new Skin();
					$this->Log->log("INIT SKIN -> OK");
					$data .= $this->getContenu($Process);
					$this->Log->log("LOAD DATA -> ".$this->Lien." OK");
					$data = $Skin->ProcessLang($data);
					$this->Log->log("LANGUAGE -> OK");
					//$data .= $this->getContenu($Process);
					//$data=$this->getHeader().$data.$this->getFooter();
//					$this->Log->Log($GLOBALS["Chrono"]->total());
				}
				print($data);
			break;
			case "csv":
				header("Content-type: application/vnd.ms-excel");
				header("Content-disposition: attachment; filename=\"monsuperfichier.csv\""); 
				$this->Log->log("CSV -> ".$this->Lien);
				if (preg_match("#(Skins|Home)/#",$this->Lien)){
					$this->Lien=substr($this->RegVars["LienOrig"],1);
					$file = $this->Lien;
					$Temp = explode("/",$file);
					$name = $Temp[sizeof($Temp)-1];
					$this->output_file($file,$name);
				}else{
					//ON definie les variables d environnements
					$this->AnalyseVars();
					if ($this->Lien==NULL) $this->setLink($this->PageDefaut);
					$Process=new Process();
					$data = $this->Error->displayErrors();
					$data .= $this->getContenu($Process);
					//$data=$this->getHeader().$data.$this->getFooter();
					$this->Log->Log($GLOBALS["Chrono"]->total());
				}
				print($data);
			break;
			case "print":
				$this->Header = new Header("PRINT");
				$data="<script>print()</script>";
			case "htrc":
			case "htms":
				$this->Log->log("DL -> ".$this->Lien);
				//ON definie les variables d environnements
				$this->AnalyseVars();

				if ($this->Lien==NULL) $this->setLink($this->PageDefaut);
				$this->Header = new Header();
				header("Content-type: text/html; charset=".CHARSET_CODE."");
				$Process=new Process();
				$Skin = new Skin();
				$data = $Skin->ProcessLang($this->getContenu($Process));
				$data=$this->getHeader().$data.$this->getFooter();
				$this->Log->Log($GLOBALS["Chrono"]->total());
				print($data);
			break;

			case "Skin":
				$this->Header = new Header();
				header("Content-type: text/html; charset=".CHARSET_CODE."");
				$Skin = new Skin();
				$Process=$Skin->Generate($Process);
				$data=$Skin->Affich();
				$data = $Skin->ProcessLang($data);
				$this->Log->Log($GLOBALS["Chrono"]->total());
				print($data);
			break;
			case "html":
			default:
// 				$this->Log->log("INIT START -> ".$this->Lien);
				header("Content-type: text/html; charset=".CHARSET_CODE."");
				$this->Header = new Header();
				//Sauf le cas d un fichier html dans la skin ou Home
				if (preg_match("#(Skins|Home)/#",$this->Lien)){
					$this->Lien=substr($this->RegVars["LienOrig"],1);
					$file = $this->Lien;
					$Temp = explode("/",$file);
					$name = $Temp[sizeof($Temp)-1];
					$this->output_file($file,$name);
				}else{
					$Skin = new Skin();
					$this->Log->log("INIT SKIN -> ".$this->Skin." OK");
					$this->CurrentSkin=$Skin; 
					//Gestion du cas ou le lien est vide
					if ($this->Lien==NULL) $this->setLink($this->PageDefaut);
					//ON definie les variables d environnements
					$Process=new Process();
					$this->AnalyseVars();
					$this->Log->log("ANALYSE VARS -> ".$this->Skin." OK");
					$Process = $Skin->Generate($Process);
					$this->Log->log("GENERATE SKIN -> ".$this->Skin." OK");
					$data=$Skin->Affich();
					$this->Log->log("AFFICH SKIN -> ".$this->Skin." OK");
 					$Contenu =$this->getContenu($Process);
					$this->Log->log("LOAD DATA -> OK");
 					$data=Process::ProcessData($data,$Contenu);
 					$data = $Skin->ProcessLang($data);
 					//On ajoute l entete
					$data=$this->getHeader().$data.$this->getFooter();
				}
// 				$this->Log->Log($GLOBALS["Chrono"]->total());
				print($data);
			break;
		}
		return $data;
	}

	function getHeader() {
		return $this->Header->Affich();
	}
	function getFooter() {
		return $this->Header->getFooter();
	}

//****************************************
//	Methodes de configuration Externe
//****************************************
	function Close() {
		foreach ($this->Modules as $Key=>$Mod){
			if ($Mod->SchemaLoaded) {$this->Modules[$Key]->Db->close();}
		}
		//Mise a jour des connexions
		if (is_object($this->Connection))$this->Connection->close();
		$this->Log->log("---------------------------------------- CLOSE----------------------------------------");
	}


	function setModules($Temp) {
		$this->Modules = $Temp;
	}

	//Definition du driver de base de donnï¿œ
	function setDriver($Temp) {
		$this->Driver = $Temp;
	}

	function setSkin($Temp) {
		$this->Skin = $Temp;
	}

	function setDefault($Temp) {
		$this->PageDefaut = $Temp;
	}

	function setLink($Temp) {
		$Temp=preg_replace("#(.*)(\..*)$#","$1",$Temp);
		$this->Lien = $Temp;
		$this->registerVar("Lien",$Temp);
	}


//***********************************
//	Procedures Stockï¿œs Statiques
//***********************************

	function isLogged() {
		return true;
	}

}
?>